package com.lsu.app.mapper;

import com.lsu.app.bean.CourseScore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 *
 * @description 针对表【course_score(课程评分表)】的数据库操作Mapper
 * @Date 2023-11-11 16:38:41
 * @author hjj
 */
@Mapper
public interface CourseScoreMapper extends BaseMapper<CourseScore> {
    @Select("select sum(score) from course_score where course_id=#{courseId}")
    Integer getScoreByCourseId(Integer courseId);//根据课程id获取总分值
    @Select("select count(*) from course_score where course_id=#{courseId}")
    Integer getCountByCourseId(Integer courseId);//根据课程id获取评分个数

}




